vcSwitchCaseStatement

A vcSwitchCaseStatement executes the first vcCaseScope for which the value of its CaseCondition property matches that of statement's Condition property.

See in: Overview

Module: vcRobotics

Parent: vcStatement

Children -

Referenced by: -

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
CasesvcListRGets expression that defines the value against which the case conditions are evaluated.
ConditionStringRWGets expression that defines the value against which the case conditions are evaluated.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
addCasevcCaseScopeNoneCreates a new empty vcCaseScope to the end of the Cases list.

Returns:
vcCaseScope: Created case scope.
deleteCaseNonevcCaseScope caseScopeRemoves an existing case from the statement Cases list and deletes it.

Parameters:
caseScope (vcCaseScope): Case scope to delete.
insertCasevcCaseScopeInteger indexCreates a new empty vcCaseScope and inserts it to the given index.
See more
If index is less than zero or greater than the current case count, the case will be appended to the end.

Parameters:
index (int): Index to insert into.

Returns:
vcCaseScope: Created case scope.
insertCasevcCaseScopeInteger index,
vcCaseScope caseScope
Inserts given caseScope to the Cases list at the given index.
If index is less than zero or greater than the current case count, the case will be appended to the end.
See more
Parameters:
index (int): Index to insert into.
caseScope (vcCaseScope): Case scope to insert.

Returns:
vcCaseScope: Inserted case scope.
moveCaseNonevcCaseScope caseScope,
Integer newIndex
Moves an existing case to the new position in the Cases list.
If the given index is less than zero or greater than the current case count, the case will be moved to the end.
See more
Parameters:
caseScope (vcCaseScope): Case scope to move.
newIndex (int): Index to move to.
releaseCaseNonevcCaseScope caseScopeRemoves an existing case from the statement Cases list, but does not delete given vcCaseScope object.

Parameters:
caseScope (vcCaseScope): Case scope to remove.

Events

Learn how to use events here. The events are also inherited from the parent class.

NameParametersDescription
OnCaseAddedNoneEvent that occurs when a case has been added.
See more
Arguments:
caseScope (vcCaseScope): Added case scope.
index (int): Index where case scope was added.
OnCaseMovedNoneEvent that occurs when a case has been moved to a new index.
See more
Arguments:
caseScope (vcCaseScope): Moved case scope.
oldIndex (int): Old index of the case scope.
newIndex (int): New index of the case scope.
OnCaseRemovedNoneEvent that occurs when a case has been removed.
See more
Arguments:
caseScope (vcCaseScope): Removed case scope.
index (int): Index of the removed case scope.